<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>websocket测试</title>
    <script src="https://unpkg.io/sockjs-client@1.5.0/dist/sockjs.min.js"></script>
    <script src='https://unpkg.io/@vertx/eventbus-bridge-client.js@1.0.0-1/vertx-eventbus.js'></script>
    
    <script>
    
    var eb = new EventBus('http://192.168.30.126:8080/eventbus/bikeTrail');
    
    eb.onopen = () => {
    
     // set a handler to receive a message
     eb.registerHandler('Grid_10_10_54', (error, message) => {
       console.log('received a message: ' + JSON.stringify(message));
     });
    
     // send a message

     let i=1;

    //  setInterval(() => {
    //   eb.send('chat.to.server', {name: i++});
    //  }, 5000);

     
    
    }
    
    </script>
  </head>

  <body></body>
</html>
